using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for PHIEUCHI.
     /// </summary>
     public class PHIEUCHI
    {
              private Int32 _MAPHIEUCHI;
      private string _MAHOADONCHI;
      private string _MAHOADONNHAPKHO;
      private decimal _TIENTHANHTOAN;
      private string _DIENGIAI;
      private Int32 _MACA;
      private DateTime _NGAYTHANHTOAN;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAPHIEUCHINullable
      { get { return false;  } }
      public Int32 MAPHIEUCHI
      {
         get { return _MAPHIEUCHI; }
         set { _MAPHIEUCHI = value; }
      }
      public bool IsMAHOADONCHINullable
      { get { return true;  } }
      public string MAHOADONCHI
      {
         get { return _MAHOADONCHI;  }
         set { _MAHOADONCHI = value; }
      }
      public bool IsMAHOADONNHAPKHONullable
      { get { return true;  } }
      public string MAHOADONNHAPKHO
      {
         get { return _MAHOADONNHAPKHO;  }
         set { _MAHOADONNHAPKHO = value; }
      }
      public bool IsTIENTHANHTOANNullable
      { get { return true;  } }
      public decimal TIENTHANHTOAN
      {
         get { return _TIENTHANHTOAN;  }
         set { _TIENTHANHTOAN = value; }
      }
      public bool IsDIENGIAINullable
      { get { return true;  } }
      public string DIENGIAI
      {
         get { return _DIENGIAI;  }
         set { _DIENGIAI = value; }
      }
      public bool IsMACANullable
      { get { return true;  } }
      public Int32 MACA
      {
         get { return _MACA;  }
         set { _MACA = value; }
      }
      public bool IsNGAYTHANHTOANNullable
      { get { return true;  } }
      public DateTime NGAYTHANHTOAN
      {
         get { return _NGAYTHANHTOAN;  }
         set { _NGAYTHANHTOAN = value; }
      }

        #endregion

        #region Constructors
        public PHIEUCHI()
        {
            Reset();
        }
        public PHIEUCHI(PHIEUCHI obj)
        {
            	this._MAPHIEUCHI = obj.MAPHIEUCHI;
	this._MAHOADONCHI = obj.MAHOADONCHI;
	this._MAHOADONNHAPKHO = obj.MAHOADONNHAPKHO;
	this._TIENTHANHTOAN = obj.TIENTHANHTOAN;
	this._DIENGIAI = obj.DIENGIAI;
	this._MACA = obj.MACA;
	this._NGAYTHANHTOAN = obj.NGAYTHANHTOAN;
        }
        #endregion

        public void Reset()
        {
                     _MAPHIEUCHI = EmptyValues.v_Int32;
         _MAHOADONCHI = EmptyValues.v_string;
         _MAHOADONNHAPKHO = EmptyValues.v_string;
         _TIENTHANHTOAN = EmptyValues.v_decimal;
         _DIENGIAI = EmptyValues.v_string;
         _MACA = EmptyValues.v_Int32;
         _NGAYTHANHTOAN = EmptyValues.v_DateTime;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAPHIEUCHI"] is DBNull))
		{
			obj.MAPHIEUCHI = (Int32)reader["MAPHIEUCHI"];
		}
                if(!(reader["MAHOADONCHI"] is DBNull))
		{
			obj.MAHOADONCHI = (string)reader["MAHOADONCHI"];
		}
                if(!(reader["MAHOADONNHAPKHO"] is DBNull))
		{
			obj.MAHOADONNHAPKHO = (string)reader["MAHOADONNHAPKHO"];
		}
                if(!(reader["TIENTHANHTOAN"] is DBNull))
		{
			obj.TIENTHANHTOAN = (decimal)reader["TIENTHANHTOAN"];
		}
                if(!(reader["DIENGIAI"] is DBNull))
		{
			obj.DIENGIAI = (string)reader["DIENGIAI"];
		}
                if(!(reader["MACA"] is DBNull))
		{
			obj.MACA = (Int32)reader["MACA"];
		}
                if(!(reader["NGAYTHANHTOAN"] is DBNull))
		{
			obj.NGAYTHANHTOAN = (DateTime)reader["NGAYTHANHTOAN"];
		}
//            _MAPHIEUCHI = (reader["MAPHIEUCHI"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAPHIEUCHI"];
//            _MAHOADONCHI = (reader["MAHOADONCHI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADONCHI"];
//            _MAHOADONNHAPKHO = (reader["MAHOADONNHAPKHO"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADONNHAPKHO"];
//            _TIENTHANHTOAN = (reader["TIENTHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TIENTHANHTOAN"];
//            _DIENGIAI = (reader["DIENGIAI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIENGIAI"];
//            _MACA = (reader["MACA"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MACA"];
//            _NGAYTHANHTOAN = (reader["NGAYTHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYTHANHTOAN"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MAPHIEUCHI, string MAHOADONCHI, string MAHOADONNHAPKHO, decimal TIENTHANHTOAN, string DIENGIAI, Int32 MACA, DateTime NGAYTHANHTOAN)
        {
                     this._MAPHIEUCHI = MAPHIEUCHI;
         this._MAHOADONCHI = MAHOADONCHI;
         this._MAHOADONNHAPKHO = MAHOADONNHAPKHO;
         this._TIENTHANHTOAN = TIENTHANHTOAN;
         this._DIENGIAI = DIENGIAI;
         this._MACA = MACA;
         this._NGAYTHANHTOAN = NGAYTHANHTOAN;
        }
    }
}